package cn.kgm.singleton;

import lombok.Builder;
import lombok.Data;

import java.util.Objects;

@Data
@Builder
public class Math {

    private static Math math;
    private String version;

    Math(String version) {
        this.version = version;
    }

    Math() {
    }

    public static synchronized Math getMath() {
        if (Objects.nonNull(math)) {
            return math;
        }
        math = new Math();
        return math;
    }
}
